using UnityEngine;
using System.Collections;

public class MainTankGun : Weapon {
	
	public GameObject ammo;
	
	public MainTankGun(MonoBehaviour player, int damage, int range, int speed, int reloadSpeed, GameObject firepoint, GameObject Ammo) {
		this.unit = player;
		this.damage = damage;
		this.range = range;
		this.speed = speed;
		this.reloadSpeed = reloadSpeed;
		this.firepoint = firepoint;
		this.ammo = Ammo;
	}
	
	public override void Fire() {
		GameObject intAmmo = GameObject.Instantiate(ammo, firepoint.transform.position, Quaternion.identity) as GameObject;
		intAmmo.rigidbody.velocity = firepoint.transform.TransformDirection (Vector3.forward * 10);
	}
}
